<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>商务签约-目的地运营集团数据管理平台</title>
<include file="Include:style" />
</head>
<body style="background: #f3f3f3;">
<div class="header">
    <a class="menu_btn" href="javascript:;"><span class="sp1"></span><span class="sp2"></span><span class="sp3"></span></a>
	商务签约
</div>
<include file="Include:commu_menu" />
<div class="content">
    <div class="contract_cont">
        <form>
			<if condition="$project['qy_status'] neq NULL">
            <div class="form_table all pb15">
                <table>
                    <tr>
                        <td class="form_table_left">客户</td>
                        <td class="form_table_right fz14">
						<if condition="$customer neq NULL">
							<foreach name="customer" item="vo">
									<a href="javascript:;" class="customer ml10" mid="{$vo['id']}">{$vo['username']}</a>
							</foreach>
						<else/>
							暂无相关客户(客户来源于项目启动表)
						</if>
						</td>
                    </tr>
                    <tr>
                        <td class="form_table_left">框架协议</td>
                        <td class="form_table_right fz14">
						<if condition="$project['is_contract'] eq 1"><if condition="$project['file_contract_url'] neq NULL"><a href="{$project['file_contract_url']}" class="ml5" data-toggle="tooltip" data-placement="right" title="下载">{:msubstr($project['file_contract_name'],0,20,'utf-8',false)}</a></if><else />无</if>
						</td>
                    </tr>
					<if condition="$project['qy_status'] egt 2">
                    <tr class="file_url">
                        <td class="form_table_left">正式协议上传</td>
                        <td class="form_table_right fz14">
						<foreach name="project['file_formal_url']" item="vo">
							<if condition="$vo neq NULL"><a href="{$vo}" data-toggle="tooltip" data-placement="right" title="下载">{:msubstr($project['file_formal_name'][$key],0,20,'utf-8',false)}</a></if>
						</foreach>
						</td>
                    </tr>
                    <tr>
                        <td class="form_table_left">所属中心</td>
                        <td class="form_table_right fz14">{$project['center_types']}</td>
                    </tr>
                    <tr>
                        <td class="form_table_left">业务类型</td>
                        <td class="form_table_right fz14">{$project['yewu_types']}</td>
                    </tr>
                    <tr>
                        <td class="form_table_left">是否签约</td>
                        <td class="form_table_right fz14">{$project['is_sign']}</td>
                    </tr>
					</if>
					<if condition="$project['qy_status'] egt 3">
                    <tr>
                        <td class="form_table_left">首款到款</td>
                        <td class="form_table_right fz14">{$project['is_first_money']}</td>
                    </tr>
					</if>
                </table>
            </div>
            <else />
            <div class="no_data_list">
                暂无相关数据
            </div>
            </if>
        </form>
    </div>
</div>
<!--弹框-->
<div class="customer_alert">
    <div class="alert_title">客户详情<a class="close" href="javascript:;"><img src="__PUBLIC__/mobile/images/project/clo_icon_y.png"></a></div>
    <div class="alert_body">
        <div class="form_table lh30">
            
        </div>
    </div>
</div>
<include file="Include:javascript" />
<script>
    $(function(){
        menu();
        $('.customer_alert .close').click(function(){
            $('.customer_alert').fadeOut();
            $('.Mask').fadeOut(function(){
                $(this).remove();
            })
        })
		//客户详情
		$(".customer").on("click",function(){
            Mask();
			var mid = $(this).attr("mid");
			$.ajax({
				type:"POST",
				async:false,
				dataType:"json",
				data:{"id":mid},
				url:"__APP__/Mobile/Project/project_card_detail",
				success:function(data){
					var html = "<table>";
					html+="<tr><td class='form_table_left'>姓名</td><td class='form_table_right'>";
					html+=data.username ? data.username : "";
					html+="</td></tr>";
					html+="<tr><td class='form_table_left'>性别</td><td class='form_table_right'>";
					html+=data.gender ? data.gender : "";
					html+="</td></tr>";
					html+="<tr><td class='form_table_left'>公司名称</td><td class='form_table_right'>";
					html+=data.company_name ? data.company_name : "";
                    html+="</td></tr>";
                    html+="<tr><td class='form_table_left'>职位</td><td class='form_table_right'>";
					html+=data.job ? data.job : "";
					html+="</td></tr>";
					html+="<tr><td class='form_table_left'>手机号</td><td class='form_table_right'>";
					html+=data.mobilephone ? data.mobilephone : "";
                    html+="</td></tr>";
                    html+="</td><td class='form_table_left'>座机号</td><td class='form_table_right'>";
					html+=data.telephone ? data.telephone : "";
					html+="</td></tr>";
					html+="</td><td class='form_table_left'>QQ</td><td class='form_table_right'>";
					html+=data.qq ? data.qq : "";
                    html+="</td></tr>";
                    html+="</td><td class='form_table_left'>邮箱</td><td class='form_table_right'>";
					html+=data.email ? data.email : "";
					html+="</td></tr>";
					html+="</td><td class='form_table_left'>地址</td><td class='form_table_right'>";
					if(data.province){
						html+=data.province+"-"+data.city;
						html+=data.address ? "-"+data.address : "";
					}else{
						html+=data.address ? data.address : "";
					}
					html+="</td></tr>";
					html+="</td><td class='form_table_left'>其他信息</td><td class='form_table_right'>";
					html+=data.remark ? data.remark : "";
					html+="</td></tr>";
					html+="</table>";
                    $(".customer_alert").find(".form_table").html(html);
                    $('.customer_alert').fadeIn();
				}
			});
		});
    })
</script>
</body>
</html>